package com.haixiaoke.smartLock.huixiangjia;

import com.haixiaoke.smartLock.huixiangjia.util.AESUtil;

import java.util.Random;

public class test {

    // public static void main(String[] args) {
    //     String s = null;
    //     try {
    //         s = AESUtil.decryptKey("Y0IFV96ntTMVlfElMC6TGU+Rv4rqlE1PFn92VRO1gX5HRbxNFtctvB2j+m/F3nR4/lLI+t44KjF46AznKlFl7Q==", "qp9Rpgp1+GDn8iFpJuvvXQ==");
    //     } catch (Exception e) {
    //         throw new RuntimeException(e);
    //     }
    //     System.out.println("s = " + s);
    // }

   /* public static void main(String[] args) {


        try {
            String token = "9/byy8/mfaIC2RbBYeDZunhrq2zKDB94QH5vSWJx/lb9OJj2VilJnjigXwvEYTIMv6W9PYo6cDuuBA3y/Kbe9g==";
            String replace = token.replace("\"", "");
            System.out.println("replace = " + replace);
            String s = AESUtil.encryptKey(token, "10632477125045953314");
            System.out.println("s = " + s);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }

    }*/

    public static void main(String[] args) {
        String inputString = "202408082121"; // 替换为你的字符串
        String phoneNumber = generatePhoneNumber(inputString);
        System.out.println("生成的手机号码: " + phoneNumber);
    }

    public static String generatePhoneNumber(String inputString) {
        String[] prefixes = {"130", "131", "132", "133", "134", "135", "136", "137", "138", "139",
                "147", "150", "151", "152", "153", "155", "156", "157", "158", "159",
                "166", "170", "171", "172", "173", "174", "175", "176", "177", "178",
                "180", "181", "182", "183", "184", "185", "186", "187", "188", "189",
                "191", "198", "199"};

        Random random = new Random();
        String prefix = prefixes[random.nextInt(prefixes.length)];

        StringBuilder suffix = new StringBuilder();
        for (int i = 0; i < 8; i++) {
            char randomChar = inputString.charAt(random.nextInt(inputString.length()));
            suffix.append(randomChar);
        }

        return prefix + suffix.toString();
    }

}
